package com.abvnet.project.water.project.controller;

import com.abvnet.framework.aspectj.lang.annotation.Log;
import com.abvnet.framework.aspectj.lang.enums.BusinessType;
import com.abvnet.framework.web.controller.BaseController;
import com.abvnet.framework.web.domain.AjaxResult;
import com.abvnet.project.water.project.domain.ProjectPartner;
import com.abvnet.project.water.project.service.IProjectPartnerService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/project/projectPartner")
public class ProjectPartnerController extends BaseController {

    private String prefix = "project/projectPartner";

    @Autowired
    private IProjectPartnerService projectPartnerService;

    /**
     * 修改保存项目参与人员
     */
    @Log(title = "项目参与人员", businessType = BusinessType.UPDATE)
    @PostMapping("/edit")
    @ResponseBody
    public AjaxResult editSave(ProjectPartner projectPartner) {
        return toAjax(projectPartnerService.updateProjectPartner(projectPartner));
    }
}
